package com.simon.resourcestatistics.dao;

import javax.transaction.Transactional;

import com.simon.resourcestatistics.model.Users;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

/**
 * IUsersDao
 */
public interface IUsersDao extends JpaRepository<Users,Integer>,JpaSpecificationExecutor<Users>{

    //登录
    @Transactional
    @Query(value="select * from users where name=? and pwd=?",nativeQuery = true)
    Users login(String name,String pwd);

}